package main

import (
	"encoding/json"
	"unsafe"
)

type JPrinter struct {
	v interface{}
}

func (p *JPrinter) String() string {
	d, _ := json.MarshalIndent(p.v, "", "\t")
	return *(*string)(unsafe.Pointer(&d))
}

func NewJPrinter(v interface{}) interface{} {
	return &JPrinter{v}
}
